from functools import wraps

def validate_input(*validators):
    """输入验证装饰器"""
    def decorator(func):
        @wraps(func)
        def wrapper(*args, **kwargs):
            for i, validator in enumerate(validators):
                if i < len(args) and not validator(args[i]):
                    raise ValueError(f"参数 {i} 验证失败: {args[i]}")
            return func(*args, **kwargs)
        return wrapper
    return decorator

def is_positive(x):
    return x > 0

def is_even(x):
    return x % 2 == 0

@validate_input(is_positive, is_even)
def process_number(a, b):
    return a * b

print(process_number(2, 4))  # 成功
# print(process_number(-1, 4))  # 失败
# print(process_number(2, 3))   # 失败